package com.io;

import java.io.File;
import java.io.FileWriter;
import java.io.IOException;

/**
 * @author weijingchen
 * @DateTime 2025-06-17
 */
public class FileWriterTest {
    public static void main(String[] args) throws IOException {
    test01(new File("src/main/resources/a.txt"));
    }

    public static void test01(File file) throws IOException {
        FileWriter fw = new FileWriter(file);
        fw.write("hello world");
        fw.write("\n");
        fw.write("hello world");
        fw.close();
    }
}
